package com.zhitong.money.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Date;
import java.util.UUID;

@Data
@AllArgsConstructor
public class Salary {
    /**
     * id
     */
    private String id;

    /**
     * 员工姓名
     */
    private String name;
    /**
     * 职位id
     */
    private String pid;
    /**
     * 发放时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date date;
    /**
     * 员工id
     */
    private String tid;
    /**
     * 基础工资
     */
    private double basicSalary;
    /**
     * 全勤奖
     */
    private double fullAttention;
    /**
     * 补贴
     */
    private double subsidy;
    /**
     * 岗位工资
     */
    private double positionSalary;
    /**
     * 加班时间
     */
    private double overTime;
    /**
     * 加班工资
     */
    private double overTimeSalary;
    /**
     * 应发总数
     */
    private double totalPay;
    /**
     * 请假的时间
     */
    private double leaveTime;
    /**
     * 请假扣款
     */
    private double leaveDeduction;
    /**
     * 迟到时间
     */
    private double lateTime;
    /**
     * 迟到扣款
     */
    private double lateDeduction;
    /**
     * 早退时间
     */
    private double earlyTime;
    /**
     * 早退扣款
     */
    private double earlyDeduction;
    /**
     * 缺勤天数
     */
    private double absenceDay;
    /**
     * 其他扣款
     */
    private double otherDeduction;
    /**
     * 应扣总数
     */
    private double totalDeduction;
    /**
     * 税率
     */
    private double taxRate;
    /**
     * 代扣税金额
     */
    private double taxSalary;
    /**
     * 实发总数
     */
    private double total;
    /**
     * 00:表示没发
     * 01:表示发了
     */
    private String result;

    /**
     * 随机获取32位id
     */
    public Salary(){
        this.id=UUID.randomUUID().toString().replaceAll("-","");
    }

}
